<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- creator-debugger.qdoc -->
  <title>Interacting with the Debugger | Qt Creator Manual</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qt Creator Manual</a></td><td >Interacting with the Debugger</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="index.html">Qt Creator Manual 4.11.1</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="creator-debugger-operating-modes.html" />
  <link rel="next" href="creator-debugging-helpers.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="creator-debugger-operating-modes.html">Launching the Debugger</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-debugging-helpers.html">Using Debugging Helpers</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#using-the-debugger">Using the Debugger</a></li>
<li class="level1"><a href="#setting-breakpoints">Setting Breakpoints</a></li>
<li class="level2"><a href="#adding-breakpoints">Adding Breakpoints</a></li>
<li class="level2"><a href="#moving-breakpoints">Moving Breakpoints</a></li>
<li class="level2"><a href="#deleting-breakpoints">Deleting Breakpoints</a></li>
<li class="level2"><a href="#enabling-and-disabling-breakpoints">Enabling and Disabling Breakpoints</a></li>
<li class="level2"><a href="#setting-data-breakpoints">Setting Data Breakpoints</a></li>
<li class="level1"><a href="#viewing-call-stack-trace">Viewing Call Stack Trace</a></li>
<li class="level1"><a href="#local-variables-and-function-parameters">Local Variables and Function Parameters</a></li>
<li class="level1"><a href="#evaluating-expressions">Evaluating Expressions</a></li>
<li class="level1"><a href="#inspecting-basic-qt-objects">Inspecting Basic Qt Objects</a></li>
<li class="level1"><a href="#directly-interacting-with-native-debuggers">Directly Interacting with Native Debuggers</a></li>
<li class="level1"><a href="#debugging-c-based-applications">Debugging C++ Based Applications</a></li>
<li class="level2"><a href="#starting-the-debugger-from-the-command-line">Starting the Debugger from the Command Line</a></li>
<li class="level2"><a href="#stepping-into-frameworks-in-macos">Stepping into Frameworks in macOS</a></li>
<li class="level2"><a href="#viewing-threads">Viewing Threads</a></li>
<li class="level2"><a href="#viewing-modules">Viewing Modules</a></li>
<li class="level2"><a href="#viewing-source-files">Viewing Source Files</a></li>
<li class="level2"><a href="#viewing-disassembled-code">Viewing Disassembled Code</a></li>
<li class="level2"><a href="#viewing-and-editing-register-state">Viewing and Editing Register State</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Interacting with the Debugger</h1>
<span class="subtitle"></span>
<!-- $$$creator-debug-mode.html-description -->
<div class="descr"> <a name="details"></a>
<p>You can use the Qt Creator <b>Debug</b> mode to inspect the state of your application while debugging. You can interact with the debugger in several ways, including the following:</p>
<ul>
<li>Go through a program line-by-line or instruction-by-instruction.</li>
<li>Interrupt running programs.</li>
<li>Set breakpoints.</li>
<li>Examine the contents of the call stack.</li>
<li>Examine and modify contents of local and global variables.</li>
<li>Examine and modify registers and memory contents of the debugged program.</li>
<li>Examine the list of loaded shared libraries.</li>
<li>Disassemble sections of code.</li>
</ul>
<p>Qt Creator displays the raw information provided by the native debuggers in a clear and concise manner with the goal to simplify the debugging process as much as possible without losing the power of the native debuggers.</p>
<p>In addition to the generic IDE functionality provided by stack view, views for locals and expressions, registers, and so on, Qt Creator includes features to make debugging Qt-based applications easy. The debugger plugin understands the internal layout of several Qt classes, for example, <a href="http://doc.qt.io/qt-5/qstring.html">QString</a>, the Qt containers, and most importantly <a href="http://doc.qt.io/qt-5/qobject.html">QObject</a> (and classes derived from it), as well as most containers of the C++ Standard Library and some GCC extensions. This deeper understanding is used to present objects of such classes in a useful way.</p>
<a name="using-the-debugger"></a>
<h2 id="using-the-debugger">Using the Debugger</h2>
<p>In <b>Debug</b> mode, you can use several views to interact with the program you are debugging. The availability of views depends on whether you are debugging C++ or QML. Frequently used views are shown by default and rarely used ones are hidden. To change the default settings, select <b>Window</b> &gt; <b>Views</b>, and then select views to display or hide. Alternatively, you can enable or disable views from the context menu of the title bar of any visible debugger view.</p>
<p class="centerAlign"><img src="images/qtcreator-debugger-views.png" alt="&quot;Debug mode views&quot;" /></p><p>You can drag and drop the views in Qt Creator to new positions on the screen. The size and position of views are saved for future sessions. Select <b>Window</b> &gt; <b>Views</b> &gt; <b>Reset to Default Layout</b> to reset the views to their original sizes and positions.</p>
<p>To save space on the screen, select <b>Window</b> &gt; <b>Views</b> &gt; <b>Automatically Hide View Titlebars</b>.</p>
<p>Once the program starts running under the control of the debugger, it behaves and performs as usual. You can interrupt a running C++ program by selecting <b>Debug</b> &gt; <b>Interrupt</b>. The program is automatically interrupted when a breakpoint is hit.</p>
<p>Once the program stops, Qt Creator:</p>
<ul>
<li>Retrieves data representing the call stack at the program's current position.</li>
<li>Retrieves the contents of local variables.</li>
<li>Examines <b>Expressions</b>.</li>
<li>Updates the <b>Registers</b>, <b>Modules</b>, and <b>Disassembler</b> views if you are debugging the C++ based applications.</li>
</ul>
<p>You can use the <b>Debug</b> mode views to examine the data in more detail.</p>
<p>You can use the following keyboard shortcuts:</p>
<ul>
<li>To finish debugging, press <b>Shift+F5</b>.</li>
<li>To execute a line of code as a whole, press <b>F10</b> (<b>Command+Shift+O</b> on <a href="nolink">macOS</a>).</li>
<li>To step into a function or a subfunction, press <b>F11</b> (<b>Command+Shift+I</b> on <a href="nolink">macOS</a>).</li>
<li>To leave the current function or subfunction, press <b>Shift+F11</b> (<b>Command+Shift+T</b> on <a href="nolink">macOS</a>).</li>
<li>To continue running the program, press <b>F5</b>.</li>
<li>To run to the line containing the cursor, press <b>Ctrl+F10</b> (<b>Shift+F8</b> on <a href="nolink">macOS</a>).</li>
<li>To run to the selected function when you are stepping into a nested function, press <b>Ctrl+F6</b>.</li>
</ul>
<p>It is also possible to continue executing the program until the current function completes or jump to an arbitrary position in the current function.</p>
<a name="setting-breakpoints"></a>
<h2 id="setting-breakpoints">Setting Breakpoints</h2>
<p>You can associate breakpoints with:</p>
<ul>
<li>Source code files and lines</li>
<li>Functions</li>
<li>Addresses</li>
<li>Throwing and catching exceptions</li>
<li>Executing and forking processes</li>
<li>Executing some system calls</li>
<li>Changes in a block of memory at a particular address when a program is running</li>
<li>Emitting QML signals</li>
<li>Throwing JavaScript exceptions</li>
</ul>
<p>The interruption of a program by a breakpoint can be restricted with certain conditions.</p>
<p>Breakpoints come in two varieties: <code>unclaimed</code> and <code>claimed</code>. An unclaimed breakpoint represents a task to interrupt the debugged program and passes the control to you later. I has two states: <code>pending</code> and <code>implanted</code>.</p>
<p>Unclaimed breakpoints are stored as a part of a session and exist independently of whether a program is being debugged or not. They are listed in the <b>Breakpoint Preset</b> view and in the editor using the <img src="images/qtcreator-unclaimed-breakpoint-icon.png" alt="" /> (<b>Unclaimed Breakpoint</b>) icon, when they refer to a position in code.</p>
<p class="centerAlign"><img src="images/qtcreator-debugger-breakpoint-preset.png" alt="&quot;Breakpoint Preset&quot; view" /></p><p>When a debugger starts, the debugging backend identifies breakpoints from the set of unclaimed breakpoints that might be handled by the debugged program and claims them for its own exclusive use. Claimed breakpoints are listed in the <b>Breakpoints</b> view of the running debugger. This view only exists while the debugger is running.</p>
<p>When a debugger claims a breakpoint, the unclaimed breakpoint disappears from the <b>Breakpoint Preset</b> view, to appear as a pending breakpoint in the <b>Breakpoints</b> view.</p>
<p>At various times, attempts are made to implant pending breakpoints into the debugged process. Succesfull implantation might create one or more implanted breakpoints, each associated with an actual address in the debugged breakpoint. The implantation might also move a breakpoint marker in the editor from an empty line to the next line for which the actual code was generated, for example. Implanted breakpoint icons don't have the hourglass overlay.</p>
<p>When the debugger ends, its claimed breakpoints, both pending and implanted, will return to the unclaimed state and re-appear in the <b>Breakpoint Preset</b> view.</p>
<p>When an implanted breakpoint is hit during the execution of the debugged program, control is passed back to you. You can then examine the state of the interrupted program, or continue execution either line-by-line or continuously.</p>
<p class="centerAlign"><img src="images/qtcreator-debug-breakpoints.png" alt="&quot;Breakpoints view&quot;" /></p><a name="adding-breakpoints"></a>
<h3 id="adding-breakpoints">Adding Breakpoints</h3>
<p>To add breakpoints:</p>
<ol class="1" type="1"><li>Add a new breakpoint in one of the following ways:<ul>
<li>In the code editor, click the left margin or press <b>F9</b> (<b>F8</b> for <a href="nolink">macOS</a>) at a particular line you want the program to stop.</li>
<li>In the <b>Breakpoint Preset</b> view or the <b>Breakpoints</b> view:<ul>
<li>Double-click the empty part of the view.</li>
<li>Right-click the view, and select <b>Add Breakpoint</b> in the context menu.</li>
</ul>
</li>
</ul>
</li>
<li>In the <b>Breakpoint type</b> field, select the location in the program code where you want the program to stop. The other options to specify depend on the selected location.<p class="centerAlign"><img src="images/qtcreator-add-breakpoint.png" alt="&quot;Add Breakpoints&quot; dialog" /></p></li>
<li>In the <b>Condition</b> field, set the condition to be evaluated before stopping at the breakpoint if the condition evaluates as true.</li>
<li>In the <b>Ignore</b> field, specify the number of times that the breakpoint is ignored before the program stops.</li>
<li>In the <b>Commands</b> field, specify the commands to execute when the program stops; one command on a line. GDB executes the commands in the order in which they are specified.</li>
</ol>
<p>For more information on breakpoints, see <a href="http://sourceware.org/gdb/onlinedocs/gdb/Breakpoints.html#Breakpoints">Breakpoints, Watchpoints, and Catchpoints</a> in GDB documentation.</p>
<a name="moving-breakpoints"></a>
<h3 id="moving-breakpoints">Moving Breakpoints</h3>
<p>To move a breakpoint:</p>
<ul>
<li>Drag and drop a breakpoint marker to another line in the text editor.</li>
<li>In the <b>Breakpoint Preset</b> view or the <b>Breakpoints</b> view, select <b>Edit Selected Breakpoints</b>, and set the line number in the <b>Line number</b> field.</li>
</ul>
<a name="deleting-breakpoints"></a>
<h3 id="deleting-breakpoints">Deleting Breakpoints</h3>
<p>To delete breakpoints:</p>
<ul>
<li>Click the breakpoint marker in the text editor.</li>
<li>In the <b>Breakpoint Preset</b> view or the <b>Breakpoints</b> view:<ul>
<li>Select the breakpoint and press <b>Delete</b>.</li>
<li>Select <b>Delete Selected Breakpoints</b>, <b>Delete Selected Breakpoints</b>, or <b>Delete Breakpoints of File</b> in the context menu.</li>
</ul>
</li>
</ul>
<a name="enabling-and-disabling-breakpoints"></a>
<h3 id="enabling-and-disabling-breakpoints">Enabling and Disabling Breakpoints</h3>
<p>To temporarily disable a breakpoint without deleting it and losing associated data like conditions and commands:</p>
<ul>
<li>Right-click the breakpoint marker in the text editor and select <b>Disable Breakpoint</b>.</li>
<li>In the <b>Breakpoint Preset</b> view or the <b>Breakpoints</b> view:<ul>
<li>Select the breakpoint and press <b>Space</b>.</li>
<li>Select <b>Disable Breakpoint</b> in the context menu.</li>
</ul>
</li>
</ul>
<p>A hollow breakpoint icon in the text editor and the views indicates a disabled breakpoint. To re-enable a breakpoint, use any of the above methods.</p>
<p>With the notable exception of data breakpoints, breakpoints retain their enabled or disabled state when the debugged program is restarted.</p>
<a name="setting-data-breakpoints"></a>
<h3 id="setting-data-breakpoints">Setting Data Breakpoints</h3>
<p>A <i>data breakpoint</i> stops the program when data is read or written at the specified address.</p>
<p>To set a data breakpoint at an address:</p>
<ol class="1" type="1"><li>In the <b>Breakpoint Preset</b> or <b>Breakpoints</b> view, select <b>Add Breakpoint</b> in the context menu.</li>
<li>In the <b>Breakpoint type</b> field, select <b>Break on data access at fixed address</b>.</li>
<li>In the <b>Address</b> field, specify the address of the memory block.</li>
<li>Select <b>OK</b>.</li>
</ol>
<p>If the address is displayed in the <b>Locals</b> or <b>Expressions</b> view, you can select <b>Add Data Breakpoint at Object's Address</b> in the context menu to set the data breakpoint.</p>
<p>Data breakpoints will be disabled when the debugged program exits, as it is unlikely that the used addresses will stay the same at the next program launch. If you really want a data breakpoint to be active again, re-enable it manually.</p>
<a name="viewing-call-stack-trace"></a>
<h2 id="viewing-call-stack-trace">Viewing Call Stack Trace</h2>
<p>When the program being debugged is interrupted, Qt Creator displays the nested function calls leading to the current position as a call stack trace. This stack trace is built up from call stack frames, each representing a particular function. For each function, Qt Creator tries to retrieve the file name and line number of the corresponding source file. This data is shown in the <b>Stack</b> view.</p>
<p class="centerAlign"><img src="images/qtcreator-debug-stack.png" alt="" /></p><p>Since the call stack leading to the current position may originate or go through code for which no debug information is available, not all stack frames have corresponding source locations. Stack frames without corresponding source locations are grayed out in the <b>Stack</b> view.</p>
<p>If you click a frame with a known source location, the text editor jumps to the corresponding location and updates the <b>Locals</b> and <b>Expressions</b> views, making it seem like the program was interrupted before entering the function.</p>
<p>To find out which QML file is causing a Qt Quick 2 application to crash, select <b>Load QML Stack</b> in the context menu in the <b>Stack</b> view. The debugger tries to retrieve the JavaScript stack from the stopped executable and prepends the frames to the C++ frames, should it find any. You can click a frame in the QML stack to open the QML file in the editor.</p>
<a name="local-variables-and-function-parameters"></a>
<h2 id="local-variables-and-function-parameters">Local Variables and Function Parameters</h2>
<p>The Locals view consists of the <b>Locals</b> pane and the <b>Return Value</b> pane (hidden when empty).</p>
<p class="centerAlign"><img src="images/qtcreator-locals.png" alt="&quot;Locals view&quot;" /></p><p>Whenever a program stops under the control of the debugger, it retrieves information about the topmost stack frame and displays it in the <b>Locals</b> view. The <b>Locals</b> pane shows information about parameters of the function in that frame as well as the local variables. If the last operation in the debugger was returning from a function after pressing <b>Shift+F11</b>, the <b>Return Value</b> pane displays the value returned by the function.</p>
<a name="evaluating-expressions"></a>
<h2 id="evaluating-expressions">Evaluating Expressions</h2>
<p>To compute values of arithmetic expressions or function calls, use expression evaluators in the <b>Expressions</b> view. To insert a new expression evaluator, either double-click on an empty part of the <b>Expressions</b> or <b>Locals</b> view, or select <b>Add New Expression Evaluator</b> from the context menu, or drag and drop an expression from the code editor.</p>
<p class="centerAlign"><img src="images/qtcreator-debugger-expressions.png" alt="" /></p><p><b>Note: </b>Expression evaluators are powerful, but slow down debugger operation significantly. It is advisable to not use them excessively, and to remove unneeded expression evaluators as soon as possible.</p><p>Expression evaluators are re-evaluated whenever the current frame changes. Note that functions used in the expressions are called each time, even if they have side-effects.</p>
<p>The QML debugger can evaluate JavaScript expressions.</p>
<p>GDB, LLDB and CDB support the evaluation of simple C and C++ expressions. Functions can be called only if they are actually compiled into the debugged executable or a library used by the executable. Most notably, inlined functions such as most <code>operator[]</code> implementations of standard containers are typically <i>not</i> available.</p>
<p>When using GDB or LLDB as backend, a special ranged syntax can be used to display multiple values with one expression. A sub-expression of form <code>foo[a..b]</code> is split into a sequence of individually evaluated expressions <code>foo[a], ..&#x2e;, foo[b]</code>.</p>
<p>Compound variables of struct or class type are displayed as expandable in the view. Expand entries to show all members. Together with the display of value and type, you can examine and traverse the low-level layout of object data.</p>
<div class="table"><table class="generic">
 <tr valign="top" class="odd"><td ><b>Note:</b></td></tr>
<tr valign="top" class="even"><td >GDB and LLDB, and therefore Qt Creator's debugger, also work for optimized builds on Linux and <a href="nolink">macOS</a>. Optimization can lead to re-ordering of instructions or removal of some local variables, causing the <b>Locals</b> and <b>Expressions</b> view to show unexpected data.</td></tr>
<tr valign="top" class="odd"><td >The debug information provided by GCC does not include enough information about the time when a variable is initialized. Therefore, Qt Creator can not tell whether the contents of a local variable contains &quot;real data&quot;, or &quot;initial noise&quot;. If a <a href="http://doc.qt.io/qt-5/qobject.html">QObject</a> appears uninitialized, its value is reported as <b>not in scope</b>. Not all uninitialized objects, however, can be recognized as such.</td></tr>
</table></div>
<p><b>Note: </b>The set of evaluated expressions is saved in your session.</p><a name="inspecting-basic-qt-objects"></a>
<h2 id="inspecting-basic-qt-objects">Inspecting Basic Qt Objects</h2>
<p>The <b>Locals</b> and <b>Expressions</b> views also provide access to the most powerful feature of the debugger: comprehensive display of data belonging to Qt's basic objects. For example, in case of <a href="http://doc.qt.io/qt-5/qobject.html">QObject</a>, instead of displaying a pointer to some private data structure, you see a list of children, signals and slots.</p>
<p>Similarly, instead of displaying many pointers and integers, Qt Creator's debugger displays the contents of a <a href="http://doc.qt.io/qt-5/qhash.html#qhash">QHash</a> or <a href="http://doc.qt.io/qt-5/qmap.html">QMap</a> in an orderly manner. Also, the debugger displays access data for <a href="http://doc.qt.io/qt-5/qfileinfo.html">QFileInfo</a> and provides access to the <i>real</i> contents of <a href="http://doc.qt.io/qt-5/qvariant.html">QVariant</a>.</p>
<p>Right-click in the <b>Locals</b> or the <b>Expressions</b> view to open a context menu that provides additional options for viewing data. The available options depend on the type of the current items, and are provided by the <a href="creator-debugging-helpers.html">Debugging Helpers</a>. Typically, string-like data, such as <code>QByteArray</code> and <code>std::string</code>, offer a selection of encodings, as well as the possibility to use a full editor window. Map-like data, such as <code>QMap</code>, <code>QHash</code>, and <code>std::map</code>, offer a compact option using the <code>name</code> column for keys, resulting in a concise display of containers with short keys, such as numbers or short strings. For example, to expand all the values of <a href="http://doc.qt.io/qt-5/qmap.html">QMap</a>, select <b>Change Value Display Format</b> &gt; <b>Compact</b>.</p>
<p>You can use the <b>Locals</b> and <b>Expressions</b> view to change the contents of variables of simple data types, for example, <code>int</code>, <code>float</code>, <code>QString</code> and <code>std::string</code> when the program is interrupted. To do so, click the <b>Value</b> column, modify the value with the inplace editor, and press <b>Enter</b> (or <b>Return</b>).</p>
<p>To change the complete contents of <a href="http://doc.qt.io/qt-5/qvector.html">QVector</a> or <code>std::vector</code> values, type all values separated by commas into the <b>Value</b> column of the main entry.</p>
<p>You can enable tooltips in the main editor displaying this information. For more information, see <a href="creator-how-tos.html#see-the-value-of-variables-in-tooltips-while-debugging">See the value of variables in tooltips while debugging</a>.</p>
<a name="directly-interacting-with-native-debuggers"></a>
<h2 id="directly-interacting-with-native-debuggers">Directly Interacting with Native Debuggers</h2>
<p>In some cases, it is convenient to directly interact with the command line of the native debugger. In Qt Creator, you can use the left pane of the <b>Debugger Log</b> view for that purpose. When you press <b>Ctrl+Enter</b>, the contents of the line under the text cursor are sent directly to the native debugger. Alternatively, you can use the line edit at the bottom of the view. Output is displayed in the right pane of the <b>Debugger Log</b> view.</p>
<p><b>Note: </b>Usually, you do not need this feature, because Qt Creator provides you with better ways to handle the task. For example, instead of using the GDB <code>print</code> command from the command line, you can evaluate an expression in the <b>Expressions</b> view.</p><a name="debugging-c-based-applications"></a>
<h2 id="debugging-c-based-applications">Debugging C++ Based Applications</h2>
<p>The following sections describe additional debugging functions that apply only to debugging C++.</p>
<a name="starting-the-debugger-from-the-command-line"></a>
<h3 id="starting-the-debugger-from-the-command-line">Starting the Debugger from the Command Line</h3>
<p>You can use the Qt Creator debugger interface from the command line. To attach it to a running process, specify the process ID as a parameter for the <code>-debug</code> option. To examine a core file, specify the file name. Qt Creator executes all the necessary steps, such as searching for the binary that belongs to a core file. To connect to a debug server, specify the server location and port number.</p>
<p>For example:</p>
<ul>
<li><code>C:\qtcreator\bin&gt;qtcreator -debug 2000</code></li>
<li><code>C:\qtcreator\bin&gt;qtcreator -debug core=core.2000</code></li>
<li><code>C:\qtcreator\bin&gt;qtcreator -debug some.exe,core=core</code></li>
<li><code>C:\qtcreator\bin&gt;qtcreator -debug server=some.dot.com:4251</code></li>
</ul>
<p>For more information, see <a href="creator-cli.html">Using Command Line Options</a>.</p>
<a name="stepping-into-frameworks-in-macos"></a>
<h3 id="stepping-into-frameworks-in-macos">Stepping into Frameworks in macOS</h3>
<p>In <a href="nolink">macOS</a>, external libraries are usually built into so-called Frameworks, which may contain both release and debug versions of the library. When you run applications on the <a href="nolink">macOS</a> desktop, the release version of Frameworks is used by default. To step into Frameworks, select the <b>Use debug versions of Frameworks</b> option in the project run settings.</p>
<a name="viewing-threads"></a>
<h3 id="viewing-threads">Viewing Threads</h3>
<p>If a multi-threaded program is interrupted, the <b>Threads</b> view or the combobox named <b>Threads</b> in the debugger status bar can be used to switch from one thread to another. The <b>Stack</b> view adjusts itself accordingly.</p>
<a name="viewing-modules"></a>
<h3 id="viewing-modules">Viewing Modules</h3>
<p>The <b>Modules</b> view displays information that the debugger plugin has about modules included in the application that is being debugged. A module is a dynamic link library (<code>.dll</code>) in Windows, a shared object (<code>.so</code>) in Linux, and a dynamic shared library (<code>.dylib</code>) in <a href="nolink">macOS</a>.</p>
<p>In addition, the view displays symbols within the modules and indicates where each module was loaded.</p>
<p>Right-click the view to open a context menu that contains menu items for:</p>
<ul>
<li>Updating the module list</li>
<li>Loading symbols for modules</li>
<li>Examining modules</li>
<li>Editing module files</li>
<li>Showing symbols in modules</li>
<li>Showing dependencies between modules (Windows only)</li>
</ul>
<p>By default, the <b>Modules</b> view is hidden.</p>
<a name="viewing-source-files"></a>
<h3 id="viewing-source-files">Viewing Source Files</h3>
<p>The <b>Source Files</b> view lists all the source files included in the project. If you cannot step into an instruction, you can check whether the source file is actually part of the project, or whether it was compiled elsewhere. The view shows the path to each file in the file system.</p>
<p>Right-click the view to open a context menu that contains menu items for reloading data and opening files.</p>
<p>By default, the <b>Source Files</b> view is hidden.</p>
<a name="viewing-disassembled-code"></a>
<h3 id="viewing-disassembled-code">Viewing Disassembled Code</h3>
<p>The <b>Disassembler</b> view displays disassembled code for the current function.</p>
<p>The <b>Disassembler</b> view is useful for low-level commands for checking single instructions, such as <b>Step Into</b> and <b>Step Over</b>. By default, the <b>Disassembler</b> view is hidden.</p>
<p>To access the <b>Disassembler</b> view, check <b>Debug</b> &gt; <b>Operate by Instruction</b> while the debugger is running. Alternatively, click the <img src="images/debugger_singleinstructionmode.png" alt="" /> (<b>Operate by Instruction</b>) tool button on the debugger tool bar.</p>
<a name="viewing-and-editing-register-state"></a>
<h3 id="viewing-and-editing-register-state">Viewing and Editing Register State</h3>
<p>The <b>Registers</b> view displays the current state of the CPU registers. Depending on the CPU type, there will be different registers available. The values of registers that recently have changed are highlighted in red and empty register values as well as leading zeroes are grayed out.</p>
<p>In addition it is possible to edit the content of registers while the program is stopped. This applies to both General-purpose and Special-purpose registers. Registers can be edited in the standard condensed view or in their particular parts if the register is displayed expanded.</p>
<p>By default, the <b>Registers</b> view is hidden.</p>
</div>
<!-- @@@creator-debug-mode.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="creator-debugger-operating-modes.html">Launching the Debugger</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="creator-debugging-helpers.html">Using Debugging Helpers</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
